import 'package:ati_package/pages/common/ati_scaffold.dart';
import 'package:ati_package/pages/common/widgets/ati_webview.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class NewsDetView extends StatefulWidget {
  const NewsDetView({super.key});

  @override
  State<NewsDetView> createState() => _NewsDetViewState();
}

class _NewsDetViewState extends State<NewsDetView> {
  @override
  Widget build(BuildContext context) {
    return AtiScaffold(
      title: '新闻详情',
      body: Container(
        margin: EdgeInsets.all(15.r),
        child: Column(
          children: [
            _buildTitleWidget(),
            Expanded(child: AtiWebview()),
          ],
        ),
      ),
    );
  }

  _buildTitleWidget() {
    return Container(
      width: double.infinity,
      margin: EdgeInsets.only(bottom: 15.r),
      padding: EdgeInsets.all(12.r),
      decoration: BoxDecoration(
        color: const Color(0xFFEFFAF5),
        borderRadius: BorderRadius.circular(8.r),
      ),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Text(
            'ATI 沙棘 NFC 原浆赋能报单计划结束通知',
            style: TextStyle(
              fontSize: 16.sp,
              fontWeight: FontWeight.w600,
              color: Colors.black,
            ),
          ),
          SizedBox(height: 6.h),
          Text(
            '2025-10-06 10:16:57',
            style: TextStyle(fontSize: 12.sp, color: Colors.grey),
          ),
        ],
      ),
    );
  }
}
